package org.example.smartEducationBackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.smartEducationBackend.entity.POJO.Resource;
import org.example.smartEducationBackend.entity.POJO.UserVideoWatch;
import org.example.smartEducationBackend.entity.POJO.VideoRecs;

import java.util.List;

@Mapper
public interface VideoRecsMapper extends BaseMapper<VideoRecs> {
    @Select("SELECT b.* FROM `video_recs` a INNER JOIN bili_demo b ON a.video_id=b.video_id  WHERE a.user_id = #{id} ORDER BY a.rating DESC")
    List<Resource>selectBYId(Integer id);
}
